package test;

import org.apache.log4j.Logger;

public class Animal implements ICheckNull{
	public String name;
	public ICheckNull getAnimal(String name){
		if(name!=null&&name.length()>0){
		Animal animal =	new Animal();
		animal.name = name;
			return animal;
			
		}else{
			return new NullAnimal();	
		}
		
	}
	public void eat(String name){
		System.out.println("is not null"+name.length());
	}
	@Override
	public void say() {
//		System.out.println(name+++++++++);
		
	}
	
	public static void main(String[] args) {
		Logger logger3 = Logger.getLogger("MailLog");
		 logger3.warn("warn!!!");
		 logger3.error("error!!!");
		 logger3.fatal("fatal!!!");
	}
}
